// 新增浏览
import request from '@/utils/request';
import { Views } from '@/api/model/Views';
import { R } from '../model/R';

/*新增浏览*/
export function addViews(data: Views) {
    return request({
        url: '/business/views',
        method: 'post',
        data: data
    });
}


/**
 * 获取我的最近预览列表
 * @param query
 */
export function getMyViews(query: any): Promise<R<Views>> {
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    return request({
        url: '/business/views/my',
        method: 'get',
        params: query
    });
}
